#ifndef __MAZE_H__
#define __MAZE_H__

#include<iostream>
#include<cstdlib>

#define MAXSIZE 100
#define M 8
#define N 8

using namespace std;

enum direction{
    UP, RIGHT, DOWN, LEFT
};
typedef struct{
    int i, j, di; //i行,i列,下一块可走的方位号
}block;
typedef struct{
    block st[MAXSIZE];
    int top = -1;
}SqStack;

void InitStack(SqStack *&s);
void ClearStack(SqStack *&s);
bool StackEmpty(SqStack *s);
bool Push(SqStack *&s, block e);
bool Pop(SqStack *&s, block &e);

//app
int mgpath(int xi, int yi, int xe, int ye);

#endif
